<style type="text/css">

div#pro-container { text-align:center; border:1px solid #CCC; height:120px; }


.pro_popup_out
{
    width:118px; position:absolute; z-index:999; margin:0px; padding:0px; display:none;
}

.pro_popup_top
{
    background:url(images/pro_popup_top.png) no-repeat; width:140px; height:20px; float:left; margin:0px; padding:0px;
}
.pro_popup_repeat
{
    background:url(images/pro_popup_repeat.png) repeat-y; width:130px; float:left; margin:0px; padding:0px 5px 0px 5px;
}
.pro_popup_bot
{
    background:url(images/pro_popup_bot.png) no-repeat; width:140px; height:14px; float:left; margin:0px; padding:0px;
}

</style>
<?php /*
<script src="js/hscrol/dw_event.js" type="text/javascript"></script>
<script src="js/hscrol/dw_scroll.js" type="text/javascript"></script>
<script src="js/hscrol/scroll_controls.js" type="text/javascript"></script>
<script type="text/javascript">

function init_dw_Scroll() {
    var wndo = new dw_scrollObj('wn', 'lyr1', 't1');
    wndo.setUpScrollControls('scrollLinks');
	wndo.setUpScrollControls('scrollLinks1');
}

// if code supported, link in the style sheet and call the init function onload
if ( dw_scrollObj.isSupported() ) {
    //dw_writeStyleSheet('css/scroll.css');
    dw_Event.add( window, 'load', init_dw_Scroll);
}

</script> */


session_start();
$userId=$_SESSION['user_id_sess'];	
require_once "includes/config.php";
//$sqlSelPro="SELECT tbl_product.*,tbl_items.item_id FROM   tbl_product, tbl_items WHERE  tbl_product.show_on_panel=1 and tbl_product.product_id = tbl_items.product_id and tbl_items.owner_id!='$userId' ORDER BY RAND() DESC LIMIT 0,6";
$sqlSelPro="SELECT tbl_product.*,tbl_items.item_id FROM   tbl_product, tbl_items WHERE  tbl_product.show_on_panel=1 and tbl_product.product_id = tbl_items.product_id  ORDER BY RAND() DESC LIMIT 0,6";
//$sqlSelPro="SELECT * FROM tbl_product WHERE posted_by!='$userId'";
$rstSelPro=mysql_query($sqlSelPro);
$numSelPro=mysql_num_rows($rstSelPro);
		
?>
<div id='panel'>

<div class="fullbox_top">&nbsp;</div>
<div class="fullbox_repeat">


<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">	
	<tr class='head-tr'>
	    <?php
	    if($_SESSION['user_type_sess']!="1")
	    {
	    ?>
		<td><strong class="orangehead">Sponsored deals</strong></td>
	    <?php
	    }
	    else
	    {
	    ?>
	      <td><strong class="orangehead">Your recent searches</strong></td>
	    <?php
	    }
	    ?>
	</tr>
	<tr>
		<td align="center">
			
		<?php if($numSelPro > 0) { ?>
		<table border="0" width="98%"><tr>
						
			<td align="center">			
			
				<table id="t1" border="0" cellpadding="0" cellspacing="2">
					<tr>
						<?php
							$i=1;
							while($rowSelPro = mysql_fetch_array($rstSelPro)) { 
								$cat = getCategory($rowSelPro['category_id']);
								$proPrice = $rowSelPro['product_price'];
								$pimage = getProductImage($rowSelPro['item_id'],'i');
								if($pimage['thumb']=="") {
									$image = "images/no_image.gif";	
								} else { 
									$image = $pimage['thumb'];
								}
								?>
								<td>
									<div id='pro-container' onmouseover="$('#pro_popup_out<?php echo $i?>').show();" onmouseout="$('#pro_popup_out<?php echo $i?>').hide();">
									<table align='center' width='100%' border='0'>
										<?php /*
										<tr>
											<td height='26' align='center'><strong><?php echo $cat['subcategoryName'] ?></strong></td>
										</tr> */ ?>
										<tr>
											<td style="height:100px;width:100px;"> 
											
											<a href="index.php?products=<?php echo $rowSelPro['item_id']; ?>">
												<img src='<?php echo $image; ?>' border='0'>
											</a>
											<div class="pro_popup_out" id="pro_popup_out<?php echo $i?>">
												<div class="pro_popup_top">&nbsp;</div>
												<div class="pro_popup_repeat">
												    <font style="color: blue; font-weight: bold;"><?php echo $rowSelPro['product_name']; ?></font><br />
												    <span style="float:left; width:50%; color:red; font-size:11px; margin-top:5px; text-align:left;">Price :</span> 
												    <span style="float:left; width:50%; color:red; font-size:11px; margin-top:5px; text-align:left;"><?php echo "$".number_format($proPrice,2);?></span>
												    <span style="float:left; width:50%; font-size:11px; margin-top:2px; text-align:left;">Shipping :</span>
												    <span style="float:left; width:50%; font-size:11px; margin-top:2px; text-align:left;"><?php echo "$".number_format($rowSelPro['shipping'],2); ?></span>
												    <span style="float:left; width:50%; font-size:11px; margin-top:2px; text-align:left;">Total :</span>
												    <span style="float:left; width:50%; font-size:11px; margin-top:2px; text-align:left;"><?php echo "$".number_format($proPrice+$rowSelPro['shipping'],2);?></span>		
												</div>
												<div class="pro_popup_bot">&nbsp;</div>
											</div>											
											</td>
										</tr>
										<?php /*
										<tr> 
											<td align="center"><strong><?php echo "$".number_format($proPrice,2); ?></strong></td>
										</tr>
										      */ ?>
									</table>	
									</div>							
								</td>
							<?php
							$i++;
							}
						?>
				   </tr>
				</table>
				
			</td>
			
			</tr>
			

			
			</table>	
			<?php } else { echo "No products found."; } ?>
			
			 
   </td>
  </tr>
</table>


</div>
<div class="fullbox_bot">&nbsp;</div>

</div>